﻿using System;
using System.Web;
using System.Web.Security;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;
namespace AnyOffice.general.system.user
{
    public partial class no_pass : ModulePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                int num = (Request.QueryString["dept_id"] == null) ? 0 : int.Parse(Request.QueryString["dept_id"].ToString());
                string str = (Request.QueryString["user_id"] == null) ? "" : Request.QueryString["user_id"].ToString();
                string str2 = FormsAuthentication.HashPasswordForStoringInConfigFile("", "md5");
                new UsersDao().ResetPassword(base.Conn, str, str2);
                string str3 = "UserId=" + str.ToString();
                SysLog.Log(base.Conn, 11, str3);
                this.lblMessage.Text = base.ShowPrompt("清除用户密码成功", "user_dept.aspx?dept_id=" + num.ToString());
            }

        }
    }
}
